package com.healthcloud.dao;

import com.healthcloud.utils.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
/**
 *
 * 基本dao
 * Created by yu on 2017/6/6.
 */
public interface BaseDao<T> {

    int save(@Param("entity") T entity);

    void save(Map<String, Object> map);

    void saveBatch(@Param("list") List<T> list);

    int update(@Param("entity") T entity);

    int delete(@Param("id") Object id);

    int deleteBatch(Object[] ids);

    T queryObject(@Param("id") Object id);

    List<T> queryList(@Param("entity") T entity,@Param("pageParam") PageParam pageParam);

    List<T> queryList(Map<String, Object> map);

    List<T> queryListById(@Param("id") Object id);

    int queryTotal(@Param("entity") T entity);

    int queryTotal(Map<String, Object> map);

    int queryTotal();

    List<T> queryListAll();
}
